﻿function GetURLParameter(locationObj, ParNameString) {
    ///<summary>得到URL地址的参数值</summary>
    ///<param name="locationObj" type="windows.location">页面location对像</param>
    ///<param name="ParNameString" type="string">参数名</param>
    ///<returns type="string" >参数值</returns>
    var _ParString = locationObj.search;
    var _ParArray = [];
    if (_ParString.length > 2) {
        _ParString = _ParString.substring(1);
        _ParArray = _ParString.split("&");
    }
    var returnString = "";
    for (var i = 0; i < _ParArray.length; i++) {
        var _OnePar = _ParArray[i].split("=");
        if (_OnePar[0] == ParNameString) {
            returnString = _OnePar[1];
            break;
        }
    }
    return returnString;
}